package com.chaos.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chaos.framework.model.entity.IdModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author jacky
 * @since 2025-06-17
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_user")
@Schema(description = "C端用户")
public class TUser extends IdModel {


    @ApiModelProperty(value = "phone")
    @TableField("phone")
    private String phone;


    @ApiModelProperty(value = "昵称")
    @TableField("nickname")
    private String nickname;


    @ApiModelProperty(value = "头像")
    @TableField("avatar")
    private String avatar;


    @ApiModelProperty(value = "union id")
    @TableField("union_id")
    private String unionId;


    @ApiModelProperty(value = "open id")
    @TableField("open_id")
    private String openId;

    @ApiModelProperty(value = "开放类型  1、微信")
    @TableField("open_type")
    private Byte openType;

    @ApiModelProperty(value = "用户备注")
    @TableField("remark")
    private String remark;


    @ApiModelProperty(value = "最后登陆")
    @TableField("last_login_time")
    private LocalDateTime lastLoginTime;


    @ApiModelProperty(value = "用户状态 1 已删除 0 在使用中")
    @TableField("status")
    private Byte status;


    @ApiModelProperty(value = "生日")
    @TableField("birthday")
    private LocalDate birthday;


    @ApiModelProperty(value = "性别 保密、男、女 对应0、1 、2")
    @TableField("gender")
    private Byte gender;

    @TableField("user_info_id")
    private Long userInfoId;

    @TableField("referrer")
    private Long referrer;

    @TableField("source")
    private String source;
}
